package com.bamboo.cmsservice.service;

import com.bamboo.cmsservice.entity.CrmBanner;
import com.bamboo.cmsservice.entity.vo.BannerQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 首页banner表 服务类
 * </p>
 *
 * @author jack.wu
 * @since 2020-07-12
 */
public interface CrmBannerService extends IService<CrmBanner> {

    /**
     * 带条件分页查询banner
     *
     * @param current     当前页
     * @param limit       每页条数
     * @param bannerQuery 查询参数
     * @return banner
     */
    Page<CrmBanner> pageBannerCondition(long current, long limit, BannerQuery bannerQuery);

    /**
     * 首页查询所有banner
     *
     * @return banner
     */
    List<CrmBanner> selectAllBanner();

    /**
     * 添加banner
     *
     * @param banner banner
     */
    void addBanner(CrmBanner banner);

    /**
     * 修改banner
     *
     * @param banner banner
     */
    void updateBanner(CrmBanner banner);

    /**
     * 删除banner
     *
     * @param id id
     */
    void removeBanner(String id);
}
